package by.yakusekmaxim.bookgid.services;

import org.springframework.transaction.annotation.Transactional;

import by.yakusekmaxim.bookgid.datamodel.Book;
import by.yakusekmaxim.bookgid.datamodel.Feedback;
import by.yakusekmaxim.bookgid.datamodel.UserAccount;

public interface FeedbackService {

	Feedback get(Long id);

    @Transactional
    void saveOrUpdate(Feedback feedback);

    @Transactional
    void delete(Feedback feedback);

    @Transactional
    void deleteAll();

    @Transactional
	Float getEvaluationBook(Book book);
    
    @Transactional
    Feedback getBookUserEvaluation(Book book,UserAccount user);
    
}
